package com.bionic.banking.logic;

import com.bionic.banking.core.entity.BankTransaction;
import com.bionic.banking.logic.exception.AccountNotFoundException;
import com.bionic.banking.logic.exception.IllegalAccountTypeException;
import com.bionic.banking.logic.exception.InsufficientCreditException;
import com.bionic.banking.logic.exception.InsufficientFundsException;
import com.bionic.banking.logic.exception.InvalidParameterException;
import com.bionic.banking.logic.exception.TransactionTypeNotFoundException;
import java.math.*;
import java.sql.SQLException;
import java.util.*;

public interface IBankTransactionController {

    List<BankTransaction> getAccountBankTransactions(
            Date startDate,
            Date endDate,
            Integer accountId) throws SQLException, InvalidParameterException, IllegalAccessException,
            InstantiationException;

    List<BankTransaction> getCustomerBankTransactions(
            Integer customerId) throws SQLException, InstantiationException,
            InvalidParameterException, IllegalAccessException ;
           
    void removeCustomerBankTransactions(Integer customerId) throws SQLException,
            InstantiationException, InvalidParameterException, IllegalAccessException;
            
    void withdraw(
            BigInteger amount,
            Integer currencyCode,
            String description,
            Integer accountId)
            throws InvalidParameterException, AccountNotFoundException,
            IllegalAccountTypeException, InsufficientFundsException, InsufficientCreditException,
            InstantiationException, IllegalAccessException,
            SQLException, TransactionTypeNotFoundException;

    void makeCharge(
            BigInteger amount,
            Integer currencyCode,
            String description,
            Integer accountId)
            throws InvalidParameterException, AccountNotFoundException,
            IllegalAccountTypeException, InsufficientCreditException,
            InstantiationException, IllegalAccessException,
            SQLException, TransactionTypeNotFoundException;

    void makePayment(
            BigInteger amount,
            Integer currencyCode,
            String description,
            Integer accountId)
            throws SQLException, InvalidParameterException, InstantiationException,
            AccountNotFoundException, IllegalAccessException,
            InsufficientFundsException, InsufficientCreditException,
            TransactionTypeNotFoundException;

    void transferFunds(
            BigInteger amount,
            Integer currencyCode,
            String description,
            Integer fromAccountId,
            Integer toAccountId)
            throws SQLException, InvalidParameterException, InstantiationException,
            AccountNotFoundException, IllegalAccessException,
            InsufficientFundsException, InsufficientCreditException,
            TransactionTypeNotFoundException;
}
